package cn.com.header.zbpk.exception;

import cn.com.header.core.EnumValue;
import cn.com.header.core.exception.HeaderException;
import cn.com.header.core.support.web.ResultCode;

/**
 * 业务异常处理器
 *
 * @author luohaidian
 * @date 2017-11-13
 * @time 16:44
 */
public class ServiceException extends HeaderException {

    private ResultCode resultCode = ResultCode.SYSTEM_ERROR;

    @Override
    public EnumValue getEnumValue() {
        return resultCode;
    }

    public ServiceException(String message){
        super(message);
    }

    protected ServiceException(String message, Throwable c){
        super(message, c);
    }

    public ServiceException(ResultCode resultCode, String message){
        super(message);
        this.resultCode = resultCode;
    }

}
